home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / More Source / C⁄C++ / Xconq 7.0d37 / lib / ww2-div-eur.g < prev    next >
Text File  |  1995-05-04  |  9KB  |  373 lines

  1. (game-module "ww2-div-eur"
  2.   (title "WWII, Division-Level, Europe")
  3.   (blurb "Definitions for division-level WWII in Europe")
  4.   (variants
  5.    (world-seen true)
  6.    (see-all true)
  7.    ("Keep Score" keep-score (true (scorekeeper (do last-side-wins))))
  8.    )
  9.   )
  10.  
  11. (unit-type a-inf (name "infantry(a)") (image-name "inf-div")
  12.   (help "Allied infantry division")
  13.   )
  14. (unit-type a-armor (name "armor(a)") (image-name "armor-div")
  15.   (help "Allied armored division")
  16.   )
  17. (unit-type a-para (name "paratroops(a)") (image-name "para-div")
  18.   (help "Allied paratroop division")
  19.   )
  20.  
  21. (define a-ground-types (a-inf a-armor a-para))
  22.  
  23. (add a-ground-types possible-sides "allies")
  24.  
  25. (add a-ground-types acp-per-turn (3 6 3))
  26.  
  27. (unit-type g-inf (name "infantry(g)") (image-name "inf-div")
  28.   (help "German infantry division")
  29.   )
  30. (unit-type g-armor (name "armor(g)") (image-name "armor-div")
  31.   (help "German Panzer division")
  32.   )
  33. (unit-type g-para (name "paratroops(g)") (image-name "para-div")
  34.   (help "German paratroop division")
  35.   )
  36. (unit-type pzgren (name "panzergrenadiers") (image-name "pzgren-div")
  37.   (help "German panzergrenadier division")
  38.   )
  39. (unit-type metro (image-name "metro-div") (image-name "inf-div")
  40.   (help "German metropolitan defense division")
  41.   )
  42. (unit-type cd (image-name "cd-div") (image-name "inf-div")
  43.   (help "German coastal defense division")
  44.   )
  45.  
  46. (define g-ground-types (g-inf g-armor g-para pzgren metro cd))
  47.  
  48. (add g-ground-types possible-sides "axis")
  49.  
  50. (add g-ground-types acp-per-turn (3 5 3 3 3 2))
  51.  
  52. (unit-type hq (image-name "hq-div") (image-name "flag")
  53.   )
  54.  
  55. (add hq acp-per-turn 6)
  56.  
  57. (define ground-types (append a-ground-types g-ground-types hq))
  58.  
  59. (define non-mot-types (a-inf g-inf))
  60.  
  61. (define mot-types (a-armor g-armor))
  62.  
  63. (unit-type train
  64.   (help "rail transport"))
  65.  
  66. ;; should have assault craft distinct from transports.
  67. (unit-type transport (image-name "ap"))
  68. (unit-type battleship (image-name "bb"))
  69.  
  70. (define ship-types (transport battleship))
  71.  
  72. (unit-type airbase)
  73. (unit-type v2-base (image-name "v2"))
  74. (unit-type port)
  75. (unit-type coast-defense (image-name "walltown"))
  76. (unit-type town (image-name "town20"))
  77.  
  78. (define place-types (airbase v2-base port coast-defense town))
  79.  
  80. ;;; Abstracted aircraft. (should have strategic vs support?)
  81.  
  82. (material-type org
  83.   (help "organization - important to do things, acquired from HQs"))
  84. (material-type air
  85.   (help "attached aircraft used for support"))
  86.  
  87. ; sea clr brkn/bocage rough/hills mtn urb road rail river rhine
  88.  
  89. (terrain-type sea (color "sky blue") (char "."))
  90. (terrain-type swamp (char "="))
  91. (terrain-type clear (color "green") (char "+"))
  92. (terrain-type broken (image-name "bocage") (color "sea green") (char "%"))
  93. (terrain-type hills (image-name "forest") (color "forest green") (char "^"))
  94. (terrain-type mountains (color "sienna") (char "/"))
  95. (terrain-type urban (char "#"))
  96. (terrain-type road (subtype connection) (subtype-x road-x)
  97.   (color "gray"))
  98. (terrain-type railroad (subtype connection) (subtype-x road-x)
  99.   (color "black"))
  100. (terrain-type river (subtype border) (subtype-x river-x)
  101.   (color "blue"))
  102. (terrain-type Rhine-river (subtype border)
  103.   (color "dark blue"))
  104.  
  105. (define land-t* (swamp clear broken hills mountains urban))
  106.  
  107. (define cell-t* (sea swamp clear broken hills mountains urban))
  108.  
  109. ;;; Static relationships.
  110.  
  111. (table vanishes-on
  112.   (ground-types sea true)
  113.   (ship-types land-t* true)
  114.   ;; Trains can only exist on railroads.
  115.   (train t* true)
  116.   (train railroad false)
  117.   (place-types sea true)
  118.   )
  119.  
  120. ;; Unit-in-terrain capacities.
  121.  
  122. (add t* capacity 3)
  123.  
  124. ;; Unit-in-unit capacities.
  125.  
  126. (table unit-size-as-occupant
  127.   (u* u* 99)
  128.   (ground-types (transport town) 1)
  129.   (ground-types train 1)
  130.   (train town 1)
  131.   )
  132.  
  133. (add transport capacity 4)
  134.  
  135. (add train capacity 1)
  136.  
  137. (add town capacity 6)
  138.  
  139. (table unit-capacity-x
  140.   (port ship-types (6 2))
  141.   )
  142.  
  143. (table unit-storage-x
  144.   ((airbase town) air 10)
  145.   )
  146.  
  147. ;;; Vision.
  148.  
  149. ;;; Static units can't do anything without the world's reporters finding
  150. ;;; out within the week.
  151.  
  152. (add place-types see-always true)
  153.  
  154. ;;; Action parameters.
  155.  
  156. (add ship-types acp-per-turn 14) ; 28 would be better
  157. (add train acp-per-turn 28)
  158.  
  159. (add place-types acp-per-turn 0)
  160. (add (airbase town) acp-per-turn 7) ; for airstrikes
  161.  
  162. ;;; Movement.
  163.  
  164. (add ship-types speed 70.00)
  165. (add place-types speed 0)
  166.  
  167. (table mp-to-enter-terrain
  168.   (mot-types hills 2)
  169.   (ground-types mountains 2)
  170.   (mot-types mountains 4)
  171.   (hq mountains 1)
  172.   (ground-types river 2)
  173.   (ground-types Rhine-river 3)
  174.   (ground-types sea 9999)
  175.   ;; Trains can only move on railroads.
  176.   (train t* 9999)
  177.   (train railroad 1)
  178.   (ship-types land-t* 9999)
  179.   )
  180.  
  181. (table zoc-range
  182.   ;; Ground units can constrain the movement of adjacent ground units.
  183.   (ground-types ground-types 1)
  184.   ;; Except for HQs, which are wimpy combatwise.
  185.   (hq u* 0)
  186.   )
  187.  
  188. (table zoc-into-terrain
  189.   (ground-types t* false)
  190.   (ground-types land-t* true)
  191.   )
  192.  
  193. (table mp-to-enter-zoc
  194.   (ground-types ground-types 7)
  195.   )
  196.  
  197. ;;; Repair.
  198.  
  199. (add u* hp-recovery 0.50)
  200.  
  201. ;;; (should have towns repair units also, but would need to be able to act then!)
  202. ;;; (could say nonzero acp-to-xxx with zero acp-max means auto-actions)
  203.  
  204. ;;; Combat.
  205.  
  206. (add ground-types hp-max 12)
  207. (add place-types hp-max 48)
  208.  
  209. (table acp-to-attack
  210.   (u* u* 1)
  211.   ;; Trains can't actually attack anything.
  212.   (train u* 0)
  213.   )
  214.  
  215. (table hit-chance
  216.   (u* u* 50)
  217.   (a-inf u* 60)
  218.   (a-armor u* 40)
  219.   (a-para u* 50)
  220.   (g-inf u* 40)
  221.   (g-armor u* 40)
  222.   (g-para u* 70)
  223.   (pzgren u* 60)
  224.   (cd u* 30)
  225.   ;; HQs are not for combat.
  226.   (hq u* 0)
  227.   ;; Transport combat is non-existent at this scale.
  228.   (u* transport 0)
  229.   (transport u* 0)
  230.   ;; Battleships are very good at shelling everything.
  231.   (battleship u* 90)
  232.   ;; ...but not so good with each other.
  233.   (battleship battleship 50)
  234.   ;; Might accidentally destroy what we're trying to capture.
  235.   (u* train 10)
  236.   )
  237.  
  238. (table damage
  239.   (u* u* 2d4)
  240.   (hq u* 0)
  241.   (u* transport 0)
  242.   (transport u* 0)
  243.   (u* train 1)
  244.   )
  245.  
  246. ;; Battleships can reach inland a little ways.
  247.  
  248. (add battleship acp-to-fire 1)
  249. (add battleship range 2)
  250.  
  251. ;; Aircraft give towns and bases a long reach.
  252.  
  253. (add (airbase town) acp-to-fire 1)
  254.  
  255. (add (airbase town) range 12)
  256.  
  257. (table consumption-per-attack
  258.   ((airbase town) air 1)
  259.   )
  260.  
  261. (table hit-by
  262.   ;; Planes can attack just about anything.
  263.   (u* air 1)
  264.   )
  265.  
  266. (table material-to-fight
  267.   ((airbase town) air 3)
  268.   )
  269.  
  270. (table capture-chance
  271.   ;; Trains are easily captured, but might be able to escape sometimes.
  272.   (ground-types train 80)
  273.   ;; Towns don't usually have much integral defense.
  274.   (ground-types place-types 90)
  275.   )
  276.  
  277. ;; (units in towns and trains should be able to help defend)
  278.  
  279. ;;; Definitions used for testing.
  280.  
  281. ;;; Some defns for the fractal percentile generator.
  282.  
  283. (set alt-blob-density 10000)
  284. (set alt-blob-size 20)
  285. (set alt-smoothing 6)
  286. (set wet-blob-density 2000)
  287. (set wet-blob-size 100)
  288.  
  289. ; sea low clr brkn rough mtn urb
  290.  
  291. (add cell-t* alt-percentile-min (  0  30  30  30  70  90  30))
  292. (add cell-t* alt-percentile-max ( 30  35  70  70  90 100  70))
  293. (add cell-t* wet-percentile-min (  0  50   0  50   0   0  45))
  294. (add cell-t* wet-percentile-max (100 100  45 100 100 100  50))
  295.  
  296. ;;; River generation.
  297.  
  298. (add (clear hills mountains) river-chance (1000 1000 2000))
  299.  
  300. (set river-sink-terrain sea)
  301.  
  302. ;;; Road generation.
  303.  
  304. (table road-chance
  305.   (town town 100)
  306.   (town (port airbase) 100)
  307.   )
  308.  
  309. (table road-into-chance
  310.   (land-t* land-t* 100)
  311.   )
  312.  
  313. (set country-radius-min 6)
  314.  
  315. (add (sea clear) country-terrain-min (5 5))
  316.  
  317. (add u* start-with 1)  ; one of everything
  318.  
  319. (table favored-terrain
  320.   (u* t* 100)
  321.   (u* (sea swamp) 0)
  322.   (ship-types sea 100)
  323.   (ship-types land-t* 0)
  324.   )
  325.  
  326. (table unit-initial-supply
  327.   ((airbase town) air 9999)
  328.   )
  329.  
  330. ;;; No political detailing needed at the divisional level.
  331.  
  332. (set side-library '(
  333.   ((name "Allies") (adjective "Allied") (class "allies")
  334.    )
  335.   ((name "Axis") (adjective "Axis") (class "axis")
  336.    (emblem-name "german-cross"))
  337.   ))
  338.  
  339. (world 2500 (year-length 52))
  340.  
  341. (set calendar '(usual "week"))
  342.  
  343. (game-module (design-notes (
  344.   "The map scale is 10 miles/hex, game time is 1 week/turn."
  345.   ""
  346.   "This game design covers division-level operations in Europe during WWII."
  347.   "Players take on the roles of army commanders but not political leaders;"
  348.   "the game does not include political factors."
  349.   )))
  350.  
  351. #|
  352.  
  353. Organization is consumed by movement/combat, supplied by HQs
  354. Have organization material increase effectiveness of combat (and movement).
  355.  
  356. HQs should auto-retreat.  Inability to retreat results in capture.
  357.  
  358. Parachutists have restrictions on initial placement (why?), won't
  359. drop further than 10 hexes from friendlies (even on invasion?)
  360. (use control radius to impl)
  361.  
  362. Mulberry is like a stationary transport, placed in the water by ships,
  363. has better unit/supply transfer parms.
  364.  
  365. Can build fortresses (very slowly), units can be inside or outside.
  366.  
  367. Admin movement should use trains/trucks (introduce as units with
  368. huge move allowance?).
  369.  
  370. All units have high prob to surrender - use ZOC to calculate.
  371.  
  372. |#
  373.